-
Notifications
You must be signed in to change notification settings - Fork 489
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parser : support admin repair table syntax #547
Conversation
Codecov Report
@@ Coverage Diff @@
## master #547 +/- ##
==========================================
- Coverage 71.77% 71.72% -0.05%
==========================================
Files 32 32
Lines 7802 7824 +22
==========================================
+ Hits 5600 5612 +12
- Misses 1674 1679 +5
- Partials 528 533 +5
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #547 +/- ##
==========================================
- Coverage 71.83% 71.72% -0.11%
==========================================
Files 32 32
Lines 7836 7824 -12
==========================================
- Hits 5629 5612 -17
- Misses 1676 1679 +3
- Partials 531 533 +2
Continue to review full report at Codecov.
|
43c053b
to
5b2e064
Compare
/run-all-tests |
The syntax looks weird. What happens with |
just rename the table, cause override will use the old table id, index id, so it's ok. |
LGTM |
1dd7c9d
to
9f383a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* support admin repair table * fix comment * add ddl test * fix depency
* support admin repair table * fix comment * add ddl test * fix depency
What problem does this PR solve?
For ISSUE to fix tableInfo (Meta) in KV store.
Bad tableInfo will be loaded error leading TiDB crash when it restart.
So we support a new syntax to repair bad tableInfo in meta (using new tableInfo build from create table statement to override the bad tableInfo, that means user should keep new tableInfo correct)
Backgound : In some corner cases or encountering serious bugs, DDL operations update table structure error occurred, causing TiDB panic and failing to restart the service.
Related TiDB PR #12046
Related Design Doc : fix broken table
What is changed and how it works?
In adminstmt parser.yy : add a new syntax
ADMIN REPAIR TABLE table_name CREATE TABLE STATEMENT
Check List
Tests